#include <stdio.h>


int main()
{
	int arr[5] = { 1, 2, 3 };
	int i = 0;
	int n = 0;
	scanf_s("%d", &n);
	for (int i = 0; i < 4; i++)
	{
		if (arr[i] >= n)
		{
			arr[i + 1] = arr[i];
			arr[i] = n;
			break;
		}
		else
		{
			n = arr[i + 1];
		}
	}
	for (int n = 0; n < 4; n++)
	{
		printf("%d ", arr[n]);
	}

	return 0;
}